package patterns.bridge;

/**
 * Created by lenovo on 2016/11/24 0024.
 * 继承自Shape的实体类，有具体的draw方法
 */
public class Circle extends Shape{
    //圆形基本参数，r，x，y
    private int radius,x,y;
    //由于super类没有默认无参的构造函数，子类也就不能有无参构造函数了。
    public Circle(int radius,int x, int y,IDrawApi drawApi){
        super(drawApi);
        this.radius = radius;
        this.x = x;
        this.y = y;
    }

    @Override
    public void draw() {
        //调用图形绘制
        drawApi.drawCircle(radius,x,y);
    }
}
